Digital voice is typically coded as a series of numerical values called samples. In Pulse Code Modulation (PCM) coding, these samples represent the amplitude of the speech signal at a given moment in time. Both data networks based on Internet Protocol (IP) and Asynchronous Transfer Mode (ATM) networks store and transmit voice as collections of samples called packets. A packet is simply a sequential string of samples attached to a header. The header indicates, among other things, an ordinal number of the packet, so packets, and the samples they carry can be correctly ordered at their destination.
Currently, networks that deliver voice, data and video do so by first segmenting the information into multiple packets and transmitting them across the network. Each packet may take an entirely different route through the network. At the receiving end of the transmission, the packets must be reassembled into proper order. For voice applications, packets must be encoded, transmitted, received, and reassembled in real-time. This real-time requirement often means that sophisticated voice coding techniques cannot be performed. Therefore, a need has arisen to develop procedures to handle end-to-end voice communications in real-time with a minimum of processing requirements.
One difficulty with Voice over IP (VoIP) applications is that IP does not guarantee that packets will arrive at the receiving end within any specified period of time, if at all. The receiving end, therefore, must be able to handle the situation where there are packets which have not arrived (or have not been detected) by the time it is necessary to output the information which the packet was expected to provide. Regardless of the cause, any packet which is not available by that time (the time at which it is necessary to output the information) is considered to be lost.
Current Methods of Handling Lost Packets
Many current methods of packet replacement are based on repeating verbatim or by estimation the contents of previous packets, or sections of previous packets. In the simplest case, if packet n+1 is lost, packet n (the preceding packet) is played in its place. More complex algorithms take a waveform or pitch estimate based on some part of the voice signal carried in the preceding packet, and use this to generate a fill packet. For convenience, the example of simply repeating the previous packet will be used throughout the remainder of the application. However, the techniques being introduced can be applied in the more general situations. FIG. 5 shows an example of packet repetition, where both packets n+1 and n+2 are replaced by repeating packet n and n+1, respectively.
In the case where multiple, consecutive packets are lost, packet repetition causes a reverberant or echo sounding distortion. The reason for this is clear: an echo is a noise that is repeated after some delay. By using packet repetition, a small segment of voice signal is being repeated. When a packet is repeated several times, the effect is exacerbated, and can be quite annoying.
The advantage to packet repeating, though, is motivated by the observation that voice signals tend to change little from packet to packet. So, by repeating a packet, a fairly reasonable estimate of the pitch of the lost packet is usually obtained.
The invention provides for a replacement packet where the replacement packet is based on a selected packet. More particularly, in one aspect the invention provides a method of operating a packet network carrying voice traffic wherein packets carrying voice traffic carry a plurality of voice samples. The method comprising the steps of:
Identifying a replacement packet opportunity,
Creating a replacement packet based on a selected packet where the replacement packet includes samples based on a selected packet but in an order which differs from the order of samples in the selected packet, and
Inserting the replacement packet in the replacement packet opportunity.
The selected packet can be potentially any packet which is actually available at the time the replacement packet is created. Since the buffer area which is used to store received packets is usually several packets deep; at the time a replacement packet is created there may well be available for selection both packets preceding the lost packet as well as one or more packets following the lost packet(s). Consequently the replacement packet can be selected as either a preceding or a following packet.
In the event a preceding packet is chosen, the selected packet can be either the directly preceding packet or an even earlier packet.
In another aspect, the invention provides a method of operating a packet network carrying voice traffic, wherein the voice traffic carrying packets include plural voice samples, the method comprising the steps of:
Identifying a sequence of replacement packet of opportunities,
Creating a replacement packet for each said opportunity based on a selected packet where the replacement packet differs from the selected packet, and
Inserting each replacement packet in a related replacement packet opportunity.